[go home]

Strapi GraphQL Plugin Duplication Issue Resolutions

Strapi version 4.x throws an error when attempting to run a Strapi server npm run develop with graphql (16.8.1) installed:

Cannot use GraphQLScalarType "Time" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed.

I resolved this by deleting the node_modules folder, placing the below in package.json to override the conflicting GraphQL version it is complaining about (can be found with npm list graphql ):

"overrides": { "@strapi/plugin-graphql": { "graphql": "16.8.1" } },

then running npm install again.
[go home]